package com.changyue.bleHelper.Req;

public class BLETargetTempReq extends BLEReq {
    public BLETargetTempReq(Double targetTemp) {
        super();
        req = new byte[8];
        req[0] = (byte) 0xA6;
        req[1] = (byte) 0x32;

        int tTemp = (int)(targetTemp.intValue()*100.0f);

        int ht = (tTemp & 0xFF00) >> 8;
        int lt = tTemp & 0xFF;

        req[2] = (byte)ht;
        req[3] = (byte)lt;

        req[4] = (byte) 0x0;
        req[5] = (byte) 0x0;
        req[6] = (byte) 0x0;
        req[7] = (byte) 0x37;
    }
}
